package com.mall.xiaomi.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Comparator;
import java.util.List;

/**
 * @author zhanghui
 * @ClassName OrederList
 * @Description TODO
 * @Date 2021/3/1 15:52
 * @Version 1.0
 **/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class OrederList implements Serializable, Comparable<List<OrderVo>>  {

    private List<OrderVo> list;



    @Override
    public int compareTo(List<OrderVo> o) {
        return this.list.get(0).getOrderTime()-o.get(0).getOrderTime()>0 ? -1 : 2;
    }
}
